package org.lx.nursing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.lx.nursing.domain.Reservation;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Mapper
public interface ReservationMapper extends BaseMapper<Reservation> {

    Integer getCancelledCount(@Param("startTime")LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

    List<Map<String, Object>> getCountByTime(@Param("startTime")LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

    boolean cancelReservation(Long id);
}
